// $Id: test_memory.cpp 2 2009-09-02 08:47:42Z joseph2002 $
/*
 * Copyright 2009 Joseph Wu
 * Distributed under the Boost Software License, Version 1.0.
 * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 *
 * For more information, see http://xpcomplus.sourceforge.net
 */

#define BOOST_TEST_MODULE test_memory
#include <boost/test/unit_test.hpp>
#include <xpcom/memory.hpp>
#include <xpcom/uuid.hpp>
#include <iostream>

using namespace std;

BOOST_AUTO_TEST_CASE(test_memory)
{
    using namespace xpcom;

    try {
        void* p = memory::alloc_data(0);
        BOOST_CHECK(p != 0);
        p = memory::realloc_data(p, 0);
        //BOOST_CHECK(p != 0);

    } catch (std::exception&) {
        BOOST_CHECK(false);
    }
}
